// Copyright Gary Evans 2006.

using System;

using Taumuon.Jabuka.Physics;

using NUnit.Framework;

namespace Taumuon.Jabuka.Physics.Test
{
    /// <summary>
    /// Tests that a body moves according to Newton's
    /// laws of motion.
    /// </summary>
    [TestFixture]
    public class TestEulerRigidBodyNewtonLaws
    {
        #region Test Methods

        /// <summary>
        /// Tests that a body with zero mass can't be created.
        /// </summary>
        [Test]
        [ExpectedException(typeof(ArgumentException))]
        public void TestCreateABodyWithZeroMass()
        {
            EulerRigidBody body = new EulerRigidBody(new Vector(0.0, 0.0, 0.0),
                new Vector(0.0, 0.0, 0.0), 0.0);
        }

        /// <summary>
        /// Tests that a body with zero location can't be created.
        /// </summary>
        [Test]
        [ExpectedException(typeof(ArgumentNullException))]
        public void TestCreateABodyWithNullLocation()
        {
            EulerRigidBody body = new EulerRigidBody(null,
                new Vector(0.0, 0.0, 0.0), 1.0);
        }

        /// <summary>
        /// Tests that a body with zero velocity can't be created.
        /// </summary>
        [Test]
        [ExpectedException(typeof(ArgumentNullException))]
        public void TestCreateABodyWithNullVelocity()
        {
            EulerRigidBody body = new EulerRigidBody( new Vector(0.0, 0.0, 0.0),
                null, 1.0);
        }

        #endregion Test Methods
    }
}
